package awt;

import javax.swing.ImageIcon;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JList;
import javax.swing.JSplitPane;

public class Demo9 extends JFrame {
	JSplitPane jsp;
	JLabel jl1;
	JList jl;

	public Demo9() {

		String words[] = { "boys", "girls", "birds" };
		jl = new JList(words);
		jl1 = new JLabel(new ImageIcon("images/pic1.jpg"));
		jsp = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, jl, jl1);
		jsp.setOneTouchExpandable(true);
		this.add(jsp);
		this.setTitle("美女");
		this.setSize(300, 300);
		this.setLocation(100, 200);
		this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		this.setVisible(true);

	}

	public static void main(String[] args) {
		Demo9 demo8 = new Demo9();

	}

}
